function setRem() {
  const baseSize = 16.01482
  const scale = document.documentElement.clientWidth / 2162
  document.documentElement.style.fontSize =
    baseSize * Math.min(scale, 2) + 'px'
}

setRem()
window.addEventListener('resize', setRem)
